<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html">
        Click "Confirm Quotation" to save quotation.
        Or choose "Cancel quotation" to go back to index.
        <p></p><h:form id="confirmNewQuotationForm">

            <h:outputText style="font-weight: bold" value="Issuance Date and Time: " />
            <h:outputText value="#{quotationBean.dateTime}">
            </h:outputText>

            <br/>
            <h:outputText style="font-weight: bold" value="Validity period for this quotation(in days)from Issuance Date: " />
            <h:outputText value="#{quotationBean.daysValid}">
            </h:outputText>

            <br/>
            <h:outputText style="font-weight: bold" value="Total Price: " />
            <h:outputText value="#{quotationBean.totalPrice}">
            </h:outputText>

            <br/>
            <br/>

            <h:dataTable cellpadding="3px" cellspacing="5px" styleClass="allaroundborder" headerClass="allaroundborder" columnClasses="allaroundborder" 
                         rowClasses="allaroundborder" value="#{quotationBean.quotationItems}" var="quotationItem">


                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Item Name" />
                    </f:facet>
                    <h:outputText value="#{quotationItem.productName}" />
                </h:column>    

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Quantity of Product" />
                    </f:facet>
                    <h:outputText value="#{quotationItem.numOfProduct}" />
                </h:column>    

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Product Price" />
                    </f:facet>
                    <h:outputText value="#{quotationItem.productPrice}" />
                </h:column>    

            </h:dataTable>    

            <br/><br/>
            <h:commandButton action="index.xhtml" value="Cancel Quotation" />
            <br/><br/>
            <h:commandButton action="confirmQuotationResult.xhtml" value="Confirm Quotation" actionListener="#{quotationBean.confirmNewQuotation}"/>
        </h:form>
</ui:composition>
